package com.example.zhengchaojun.arcgis.test;

import android.os.Bundle;

import com.esri.arcgisruntime.layers.WebTiledLayer;
import com.esri.arcgisruntime.mapping.ArcGISMap;
import com.esri.arcgisruntime.mapping.Basemap;
import com.esri.arcgisruntime.mapping.view.MapView;
import com.example.zhengchaojun.arcgis.R;

/**
 * 类描述：天地图影像(二维)
 * 作者：郑朝军 on 2018/5/10
 * 邮箱：1250393285@qq.com
 * 公司：武汉智博创享科技有限公司
 * 修改人：郑朝军 on 2018/5/10
 * 修改备注：
 */
public class TianDiTuIMGMapActivityGG extends BaseTianMapActivity
{
    protected MapView m_mapView;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutID());
        init();

        WebTiledLayer webTiledLayer = CreateTianDiTuTiledLayer1();
        Basemap tdtBasemap = new Basemap(webTiledLayer);
        WebTiledLayer webTiledLayer1 = CreateTianDiTuTiledLayer2();
        tdtBasemap.getBaseLayers().add(webTiledLayer1);
        ArcGISMap map = new ArcGISMap(tdtBasemap);
        m_mapView.setMap(map);
        m_mapView.setAttributionTextVisible(false);
    }



    public int getLayoutID()
    {
        return R.layout.activity_tian;
    }

    public void init()
    {
        initView();
        initData();
    }

    public void initView()
    {
        m_mapView = findViewById(R.id.mapView);
        initMap();
    }

    private void initMap()
    {
    }

    public void initData()
    {
    }

    @Override
    protected void onPause()
    {
        m_mapView.pause();
        super.onPause();
    }

    @Override
    protected void onResume()
    {
        super.onResume();
        m_mapView.resume();
    }

    @Override
    protected void onDestroy()
    {
        super.onDestroy();
        m_mapView.dispose();
    }
}
